<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>居中测试</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .main{
      background-color: wheat;
    }
    .center{
      width: 1000px;
      background-color: yellow;
      margin: 0 auto;
    }
    .card{
      width: 200px;
      height: 300px;
      background-color: pink;
      border: 5px solid red;
      margin: 0 auto;
      text-align: center;
      line-height: 300px;
    }
  </style>
</head>
<body>
<div class="main">
  <div class="center">
    <div class="card">我是内容1</div>
    <div class="card">我是内容1</div>
    <div class="card">我是内容1</div>
    <div class="card">我是内容1</div>
    <div class="card">我是内容1</div>
  </div>
</div>
</body>
</html>